﻿<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="frmRoles.aspx.cs" Inherits="frmRoles" Title="Untitled Page" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat=server>


    <div>
            <table>
            <tr align="center" class="Titulo">
                <td colspan="4">Administración de Roles</td>
            </tr>
            <tr>
                <td align="left">Nombre Rol:</td>
                <td align="left">
                        
                    <asp:TextBox ID="TxtRol" runat="server" CssClass="TextBox" MaxLength="50"
                        Width="176px" ToolTip="Nombre del Rol." 
                         ></asp:TextBox>
                        
                    </td>
                <td align="left">
                    &nbsp;</td>
                        
            </tr>
        
             <tr>
              <td align="left">Observaciones: </td>
                <td colspan="3" align="left">
                    <asp:TextBox ID="txtObservaciones" runat="server" CssClass="TextBox" MaxLength="100"
                        Width="442px" ToolTip="Observaciones del Rol seleccionado." 
                         TextMode="MultiLine" ></asp:TextBox>
               </td>
               
            
                        
            </tr>
             <tr>
                <td colspan="1" align="center">
                     <asp:ImageButton ID="btnNuevo" runat="server" 
                         ImageUrl="~/images/Forecast.gif"  
                         ToolTip="Nuevo rol" onclick="btnNuevo_Click" />
                </td>
                  <td colspan="1" align="center">
                     <asp:ImageButton ID="btnGuardar" runat="server" 
                         ImageUrl="~/images/save.png"
                         ToolTip="Guardar Cambios" onclick="btnGuardar_Click" />
                </td>
                  <td colspan="1" align="center">
                     <asp:ImageButton ID="btnEliminar" runat="server" 
                         ImageUrl="~/images/btneliminar.gif" 
                         ToolTip="Eliminar Rol" onclick="btnEliminar_Click" Width="19px"   OnClientClick="return confirm('¿Esta seguro de Eliminar este Rol?');"  />
                </td>
                 <td colspan="1" align="center">
                     &nbsp;</td>
            </tr>
            <tr>
            <td colspan="4" align="left"> 
                <%--     <asp:ImageButton ID="ImageButton1" runat="server" CommandName="Seleccionar"
                        ImageUrl="~/img/edit-icon.gif" onclick="imgbtnVer_Click"  />--%>
                
                 <asp:GridView ID="grdRoles" runat="server" AutoGenerateColumns="False" 
        Width="100%"  CssClass="listing"
        AllowPaging="True" Font-Size="Smaller" ToolTip="Nuevo ro" 
                    onrowediting="grdRoles_RowEditing" DataKeyNames="ID">
        <Columns>
          <asp:BoundField DataField="ID" HeaderText="ID" ><ItemStyle HorizontalAlign="Center" /></asp:BoundField>
            <asp:BoundField DataField="NOMBRE" HeaderText="Nombre Rol" ><ItemStyle HorizontalAlign="Center" /></asp:BoundField>
            <asp:BoundField DataField="DESCRIPCION" HeaderText="Descripsión" ><ItemStyle HorizontalAlign="Center" /></asp:BoundField>
            <asp:CommandField EditImageUrl="../images/editar.gif" HeaderText="Editar" ShowEditButton="True" ButtonType="Image" />

              
        </Columns>
        <FooterStyle BackColor="#5D7B9D"  ForeColor="White" />
                                <SelectedRowStyle BackColor="#E2DED6" ForeColor="#333333" />
                                <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />                                                                                       
                                <AlternatingRowStyle BackColor="White" CssClass="bg" ForeColor="#284775" />
                                <EditRowStyle BackColor="#999999" />
    </asp:GridView>
                </td>
            </tr> 
            
                    
           
                    
        </table>

    </div>
    
    
    <asp:HiddenField ID="hidRol" runat="server" />
    
    
    <asp:HiddenField ID="hidRolNuevo" runat="server" Value="1" />
    
    
    </asp:Content>